<%@page import="model.CategoryImp"%>
<%@page import="model.ProductImp"%>
<%@page import="model.entity.*"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page import="java.io.*,java.util.*, javax.servlet.*" %>


<div class="tab_container">
    <div id="tab2" class="tab_content" style="display: block;">
        <h2>Create Product</h2>
<%
   
    List<Category> lcat = (List<Category>)request.getAttribute("lcat");
%>
        <p>
            Enter information to create product.
        </p>
<p class="message1">
<%
                            String message1 = request.getAttribute("messagecreate")==null ? "":request.getAttribute("messagecreate").toString();
                        out.println(message1);
%>
                 </p>
        <form action="<c:url value="<%= "/admin/product/create/"%>"/>" method="POST"  enctype="multipart/form-data" >
            <p>
            <select name="categoryid" id="cbo" class="select">
<%for(Category cat : lcat)
{
%>
            <option   value="<%= cat.getCategoryid() %>" ><%= cat.getCategoryname() %></option>
<%
}
%>
            </select>
            </p>
            <p>
                <label>Product Name:</label><br/><input type="text" class="text medium" name="productname"> 
            </p>
            <p>
                <label>Quantity:</label>
                <input type="text" class="text normal" name="quantity">
            </p>
            <p>
                <label>UnitCost:</label><input type="text" class="text normal" name="unitcost" > USD
            </p>
            <p>
                <label>Product Type:</label>
             	
                  <input  type="radio" checked="checked" name="prodtype" id="RADIO1" value="Normal">
                  <label for="RADIO1">Normal</label>
                  <input type="radio" name="prodtype" id="RADIO2" value="Special">
                  <label for="RADIO2">Special</label>
                  <input type="radio" name="prodtype" id="RADIO3" value="Discount">
                  <label for="RADIO3">Discount</label>
      
            </p>
            <p>
                <label>Image:</label>
                <input type="file" name="picture" size="50" />
            </p>
            
           
<p>
                  <label>Detail:</label><br>
                  <textarea name="productdetail"  cols="8" rows="5" ></textarea>
            </p>
            <p>
                <input type="submit" class="submit" value="Create" >
            </p>

        </form>

    </div>
</div>